Autogenerated HTML docs for v2.40.1-423-g2807b 
diff --git a/githooks.txt b/githooks.txt index 6290860..c8e55b2 100644 --- a/githooks.txt +++ b/githooks.txt 
@@ -600,6 +600,28 @@  non-zero status causes `git send-email` to abort before sending any  e-mails.   +The following environment variables are set when executing the hook. + +`GIT_SENDEMAIL_FILE_COUNTER`:: +	A 1-based counter incremented by one for every file holding an e-mail +	to be sent (excluding any FIFOs). This counter does not follow the +	patch series counter scheme. It will always start at 1 and will end at +	GIT_SENDEMAIL_FILE_TOTAL. + +`GIT_SENDEMAIL_FILE_TOTAL`:: +	The total number of files that will be sent (excluding any FIFOs). This +	counter does not follow the patch series counter scheme. It will always +	be equal to the number of files being sent, whether there is a cover +	letter or not. + +These variables may for instance be used to validate patch series. + +The sample `sendemail-validate` hook that comes with Git checks that all sent +patches (excluding the cover letter) can be applied on top of the upstream +repository default branch without conflicts. Some placeholders are left for +additional validation steps to be performed after all patches of a given series +have been applied. +  fsmonitor-watchman  ~~~~~~~~~~~~~~~~~~